package com.seraph.zys.dao.impl;

import com.seraph.bi.suite.support.domain.pagination.PageBox;
import com.seraph.bi.suite.support.domain.pagination.PageObject;
import com.seraph.zys.dao.PccPaTreatSuppFeeDAO;
import com.seraph.zys.dao.domain.PccPaTreatSuppFee;
import com.seraph.zys.dao.domain.PccPaTreatSuppFeeExample;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

@Repository
public class PccPaTreatSuppFeeDAOImpl extends SqlMapClientDaoSupport implements PccPaTreatSuppFeeDAO {

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public PccPaTreatSuppFeeDAOImpl() {
        super();
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public Integer insert(PccPaTreatSuppFee record) {
        Object newKey = getSqlMapClientTemplate().insert("pcc_pa_treat_supp_fee.abatorgenerated_insert", record);
        return (Integer) newKey;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public int updateByPrimaryKey(PccPaTreatSuppFee record) {
        int rows = getSqlMapClientTemplate().update("pcc_pa_treat_supp_fee.abatorgenerated_updateByPrimaryKey", record);
        return rows;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public int updateByPrimaryKeySelective(PccPaTreatSuppFee record) {
        int rows = getSqlMapClientTemplate().update("pcc_pa_treat_supp_fee.abatorgenerated_updateByPrimaryKeySelective", record);
        return rows;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public List selectByExample(PccPaTreatSuppFeeExample example, String orderByClause) {
        Map parms = getExampleParms(example);
        if (orderByClause != null) {
            parms.put("ABATOR_ORDER_BY_CLAUSE", orderByClause);
        }
        List list = getSqlMapClientTemplate().queryForList("pcc_pa_treat_supp_fee.abatorgenerated_selectByExample", parms);
        return list;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public List selectByExample(PccPaTreatSuppFeeExample example) {
        return selectByExample(example, null);
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public PccPaTreatSuppFee selectByPrimaryKey(Integer id) {
        PccPaTreatSuppFee key = new PccPaTreatSuppFee();
        key.setId(id);
        PccPaTreatSuppFee record = (PccPaTreatSuppFee) getSqlMapClientTemplate().queryForObject("pcc_pa_treat_supp_fee.abatorgenerated_selectByPrimaryKey", key);
        return record;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public int deleteByExample(PccPaTreatSuppFeeExample example) {
        int rows = getSqlMapClientTemplate().delete("pcc_pa_treat_supp_fee.abatorgenerated_deleteByExample", getExampleParms(example));
        return rows;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public int deleteByPrimaryKey(Integer id) {
        PccPaTreatSuppFee key = new PccPaTreatSuppFee();
        key.setId(id);
        int rows = getSqlMapClientTemplate().delete("pcc_pa_treat_supp_fee.abatorgenerated_deleteByPrimaryKey", key);
        return rows;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getIDExampleParms(PccPaTreatSuppFeeExample example) {
        Map parms = new HashMap();
        switch (example.getId_Indicator()) {
        case PccPaTreatSuppFeeExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_NULL", "Y");
            } else {
                parms.put("AND_ID_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_NOT_NULL", "Y");
            } else {
                parms.put("AND_ID_NOT_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_EQUALS", "Y");
            } else {
                parms.put("AND_ID_EQUALS", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_ID_NOT_EQUALS", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_GT", "Y");
            } else {
                parms.put("AND_ID_GT", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_GE", "Y");
            } else {
                parms.put("AND_ID_GE", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_LT", "Y");
            } else {
                parms.put("AND_ID_LT", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_LE", "Y");
            } else {
                parms.put("AND_ID_LE", "Y");
            }
            parms.put("id", example.getId());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getFISCAL_YEARExampleParms(PccPaTreatSuppFeeExample example) {
        Map parms = new HashMap();
        switch (example.getFiscalYear_Indicator()) {
        case PccPaTreatSuppFeeExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_NULL", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_NOT_NULL", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_NOT_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_EQUALS", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_EQUALS", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_NOT_EQUALS", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_GT", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_GT", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_GE", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_GE", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_LT", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_LT", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_LE", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_LE", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getFROM_AREAExampleParms(PccPaTreatSuppFeeExample example) {
        Map parms = new HashMap();
        switch (example.getFromArea_Indicator()) {
        case PccPaTreatSuppFeeExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_NULL", "Y");
            } else {
                parms.put("AND_FROM_AREA_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_NOT_NULL", "Y");
            } else {
                parms.put("AND_FROM_AREA_NOT_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_EQUALS", "Y");
            } else {
                parms.put("AND_FROM_AREA_EQUALS", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_FROM_AREA_NOT_EQUALS", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_GT", "Y");
            } else {
                parms.put("AND_FROM_AREA_GT", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_GE", "Y");
            } else {
                parms.put("AND_FROM_AREA_GE", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_LT", "Y");
            } else {
                parms.put("AND_FROM_AREA_LT", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_LE", "Y");
            } else {
                parms.put("AND_FROM_AREA_LE", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LIKE:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_LIKE", "Y");
            } else {
                parms.put("AND_FROM_AREA_LIKE", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getSORT_IDExampleParms(PccPaTreatSuppFeeExample example) {
        Map parms = new HashMap();
        switch (example.getSortId_Indicator()) {
        case PccPaTreatSuppFeeExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_NULL", "Y");
            } else {
                parms.put("AND_SORT_ID_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_NOT_NULL", "Y");
            } else {
                parms.put("AND_SORT_ID_NOT_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_EQUALS", "Y");
            } else {
                parms.put("AND_SORT_ID_EQUALS", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_SORT_ID_NOT_EQUALS", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_GT", "Y");
            } else {
                parms.put("AND_SORT_ID_GT", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_GE", "Y");
            } else {
                parms.put("AND_SORT_ID_GE", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_LT", "Y");
            } else {
                parms.put("AND_SORT_ID_LT", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_LE", "Y");
            } else {
                parms.put("AND_SORT_ID_LE", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getPATIENTS_TYPEExampleParms(PccPaTreatSuppFeeExample example) {
        Map parms = new HashMap();
        switch (example.getPatientsType_Indicator()) {
        case PccPaTreatSuppFeeExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENTS_TYPE_NULL", "Y");
            } else {
                parms.put("AND_PATIENTS_TYPE_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENTS_TYPE_NOT_NULL", "Y");
            } else {
                parms.put("AND_PATIENTS_TYPE_NOT_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENTS_TYPE_EQUALS", "Y");
            } else {
                parms.put("AND_PATIENTS_TYPE_EQUALS", "Y");
            }
            parms.put("patientsType", example.getPatientsType());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENTS_TYPE_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_PATIENTS_TYPE_NOT_EQUALS", "Y");
            }
            parms.put("patientsType", example.getPatientsType());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENTS_TYPE_GT", "Y");
            } else {
                parms.put("AND_PATIENTS_TYPE_GT", "Y");
            }
            parms.put("patientsType", example.getPatientsType());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENTS_TYPE_GE", "Y");
            } else {
                parms.put("AND_PATIENTS_TYPE_GE", "Y");
            }
            parms.put("patientsType", example.getPatientsType());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENTS_TYPE_LT", "Y");
            } else {
                parms.put("AND_PATIENTS_TYPE_LT", "Y");
            }
            parms.put("patientsType", example.getPatientsType());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENTS_TYPE_LE", "Y");
            } else {
                parms.put("AND_PATIENTS_TYPE_LE", "Y");
            }
            parms.put("patientsType", example.getPatientsType());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LIKE:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENTS_TYPE_LIKE", "Y");
            } else {
                parms.put("AND_PATIENTS_TYPE_LIKE", "Y");
            }
            parms.put("patientsType", example.getPatientsType());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getTREAT_FEEExampleParms(PccPaTreatSuppFeeExample example) {
        Map parms = new HashMap();
        switch (example.getTreatFee_Indicator()) {
        case PccPaTreatSuppFeeExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TREAT_FEE_NULL", "Y");
            } else {
                parms.put("AND_TREAT_FEE_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TREAT_FEE_NOT_NULL", "Y");
            } else {
                parms.put("AND_TREAT_FEE_NOT_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TREAT_FEE_EQUALS", "Y");
            } else {
                parms.put("AND_TREAT_FEE_EQUALS", "Y");
            }
            parms.put("treatFee", example.getTreatFee());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TREAT_FEE_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_TREAT_FEE_NOT_EQUALS", "Y");
            }
            parms.put("treatFee", example.getTreatFee());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TREAT_FEE_GT", "Y");
            } else {
                parms.put("AND_TREAT_FEE_GT", "Y");
            }
            parms.put("treatFee", example.getTreatFee());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TREAT_FEE_GE", "Y");
            } else {
                parms.put("AND_TREAT_FEE_GE", "Y");
            }
            parms.put("treatFee", example.getTreatFee());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TREAT_FEE_LT", "Y");
            } else {
                parms.put("AND_TREAT_FEE_LT", "Y");
            }
            parms.put("treatFee", example.getTreatFee());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TREAT_FEE_LE", "Y");
            } else {
                parms.put("AND_TREAT_FEE_LE", "Y");
            }
            parms.put("treatFee", example.getTreatFee());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getNutrit_supp_scaleExampleParms(PccPaTreatSuppFeeExample example) {
        Map parms = new HashMap();
        switch (example.getNutritSuppScale_Indicator()) {
        case PccPaTreatSuppFeeExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_scale_NULL", "Y");
            } else {
                parms.put("AND_Nutrit_supp_scale_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_scale_NOT_NULL", "Y");
            } else {
                parms.put("AND_Nutrit_supp_scale_NOT_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_scale_EQUALS", "Y");
            } else {
                parms.put("AND_Nutrit_supp_scale_EQUALS", "Y");
            }
            parms.put("nutritSuppScale", example.getNutritSuppScale());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_scale_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_Nutrit_supp_scale_NOT_EQUALS", "Y");
            }
            parms.put("nutritSuppScale", example.getNutritSuppScale());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_scale_GT", "Y");
            } else {
                parms.put("AND_Nutrit_supp_scale_GT", "Y");
            }
            parms.put("nutritSuppScale", example.getNutritSuppScale());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_scale_GE", "Y");
            } else {
                parms.put("AND_Nutrit_supp_scale_GE", "Y");
            }
            parms.put("nutritSuppScale", example.getNutritSuppScale());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_scale_LT", "Y");
            } else {
                parms.put("AND_Nutrit_supp_scale_LT", "Y");
            }
            parms.put("nutritSuppScale", example.getNutritSuppScale());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_scale_LE", "Y");
            } else {
                parms.put("AND_Nutrit_supp_scale_LE", "Y");
            }
            parms.put("nutritSuppScale", example.getNutritSuppScale());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getNutrit_supp_PRICEExampleParms(PccPaTreatSuppFeeExample example) {
        Map parms = new HashMap();
        switch (example.getNutritSuppPrice_Indicator()) {
        case PccPaTreatSuppFeeExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_PRICE_NULL", "Y");
            } else {
                parms.put("AND_Nutrit_supp_PRICE_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_PRICE_NOT_NULL", "Y");
            } else {
                parms.put("AND_Nutrit_supp_PRICE_NOT_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_PRICE_EQUALS", "Y");
            } else {
                parms.put("AND_Nutrit_supp_PRICE_EQUALS", "Y");
            }
            parms.put("nutritSuppPrice", example.getNutritSuppPrice());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_PRICE_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_Nutrit_supp_PRICE_NOT_EQUALS", "Y");
            }
            parms.put("nutritSuppPrice", example.getNutritSuppPrice());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_PRICE_GT", "Y");
            } else {
                parms.put("AND_Nutrit_supp_PRICE_GT", "Y");
            }
            parms.put("nutritSuppPrice", example.getNutritSuppPrice());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_PRICE_GE", "Y");
            } else {
                parms.put("AND_Nutrit_supp_PRICE_GE", "Y");
            }
            parms.put("nutritSuppPrice", example.getNutritSuppPrice());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_PRICE_LT", "Y");
            } else {
                parms.put("AND_Nutrit_supp_PRICE_LT", "Y");
            }
            parms.put("nutritSuppPrice", example.getNutritSuppPrice());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_PRICE_LE", "Y");
            } else {
                parms.put("AND_Nutrit_supp_PRICE_LE", "Y");
            }
            parms.put("nutritSuppPrice", example.getNutritSuppPrice());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getNutrit_supp_FEEExampleParms(PccPaTreatSuppFeeExample example) {
        Map parms = new HashMap();
        switch (example.getNutritSuppFee_Indicator()) {
        case PccPaTreatSuppFeeExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_FEE_NULL", "Y");
            } else {
                parms.put("AND_Nutrit_supp_FEE_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_FEE_NOT_NULL", "Y");
            } else {
                parms.put("AND_Nutrit_supp_FEE_NOT_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_FEE_EQUALS", "Y");
            } else {
                parms.put("AND_Nutrit_supp_FEE_EQUALS", "Y");
            }
            parms.put("nutritSuppFee", example.getNutritSuppFee());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_FEE_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_Nutrit_supp_FEE_NOT_EQUALS", "Y");
            }
            parms.put("nutritSuppFee", example.getNutritSuppFee());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_FEE_GT", "Y");
            } else {
                parms.put("AND_Nutrit_supp_FEE_GT", "Y");
            }
            parms.put("nutritSuppFee", example.getNutritSuppFee());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_FEE_GE", "Y");
            } else {
                parms.put("AND_Nutrit_supp_FEE_GE", "Y");
            }
            parms.put("nutritSuppFee", example.getNutritSuppFee());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_FEE_LT", "Y");
            } else {
                parms.put("AND_Nutrit_supp_FEE_LT", "Y");
            }
            parms.put("nutritSuppFee", example.getNutritSuppFee());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Nutrit_supp_FEE_LE", "Y");
            } else {
                parms.put("AND_Nutrit_supp_FEE_LE", "Y");
            }
            parms.put("nutritSuppFee", example.getNutritSuppFee());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getPsych_supp_scaleExampleParms(PccPaTreatSuppFeeExample example) {
        Map parms = new HashMap();
        switch (example.getPsychSuppScale_Indicator()) {
        case PccPaTreatSuppFeeExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_scale_NULL", "Y");
            } else {
                parms.put("AND_Psych_supp_scale_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_scale_NOT_NULL", "Y");
            } else {
                parms.put("AND_Psych_supp_scale_NOT_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_scale_EQUALS", "Y");
            } else {
                parms.put("AND_Psych_supp_scale_EQUALS", "Y");
            }
            parms.put("psychSuppScale", example.getPsychSuppScale());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_scale_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_Psych_supp_scale_NOT_EQUALS", "Y");
            }
            parms.put("psychSuppScale", example.getPsychSuppScale());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_scale_GT", "Y");
            } else {
                parms.put("AND_Psych_supp_scale_GT", "Y");
            }
            parms.put("psychSuppScale", example.getPsychSuppScale());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_scale_GE", "Y");
            } else {
                parms.put("AND_Psych_supp_scale_GE", "Y");
            }
            parms.put("psychSuppScale", example.getPsychSuppScale());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_scale_LT", "Y");
            } else {
                parms.put("AND_Psych_supp_scale_LT", "Y");
            }
            parms.put("psychSuppScale", example.getPsychSuppScale());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_scale_LE", "Y");
            } else {
                parms.put("AND_Psych_supp_scale_LE", "Y");
            }
            parms.put("psychSuppScale", example.getPsychSuppScale());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getPsych_supp_PRICEExampleParms(PccPaTreatSuppFeeExample example) {
        Map parms = new HashMap();
        switch (example.getPsychSuppPrice_Indicator()) {
        case PccPaTreatSuppFeeExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_PRICE_NULL", "Y");
            } else {
                parms.put("AND_Psych_supp_PRICE_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_PRICE_NOT_NULL", "Y");
            } else {
                parms.put("AND_Psych_supp_PRICE_NOT_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_PRICE_EQUALS", "Y");
            } else {
                parms.put("AND_Psych_supp_PRICE_EQUALS", "Y");
            }
            parms.put("psychSuppPrice", example.getPsychSuppPrice());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_PRICE_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_Psych_supp_PRICE_NOT_EQUALS", "Y");
            }
            parms.put("psychSuppPrice", example.getPsychSuppPrice());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_PRICE_GT", "Y");
            } else {
                parms.put("AND_Psych_supp_PRICE_GT", "Y");
            }
            parms.put("psychSuppPrice", example.getPsychSuppPrice());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_PRICE_GE", "Y");
            } else {
                parms.put("AND_Psych_supp_PRICE_GE", "Y");
            }
            parms.put("psychSuppPrice", example.getPsychSuppPrice());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_PRICE_LT", "Y");
            } else {
                parms.put("AND_Psych_supp_PRICE_LT", "Y");
            }
            parms.put("psychSuppPrice", example.getPsychSuppPrice());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_PRICE_LE", "Y");
            } else {
                parms.put("AND_Psych_supp_PRICE_LE", "Y");
            }
            parms.put("psychSuppPrice", example.getPsychSuppPrice());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getPsych_supp_FEEExampleParms(PccPaTreatSuppFeeExample example) {
        Map parms = new HashMap();
        switch (example.getPsychSuppFee_Indicator()) {
        case PccPaTreatSuppFeeExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_FEE_NULL", "Y");
            } else {
                parms.put("AND_Psych_supp_FEE_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_FEE_NOT_NULL", "Y");
            } else {
                parms.put("AND_Psych_supp_FEE_NOT_NULL", "Y");
            }
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_FEE_EQUALS", "Y");
            } else {
                parms.put("AND_Psych_supp_FEE_EQUALS", "Y");
            }
            parms.put("psychSuppFee", example.getPsychSuppFee());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_FEE_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_Psych_supp_FEE_NOT_EQUALS", "Y");
            }
            parms.put("psychSuppFee", example.getPsychSuppFee());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_FEE_GT", "Y");
            } else {
                parms.put("AND_Psych_supp_FEE_GT", "Y");
            }
            parms.put("psychSuppFee", example.getPsychSuppFee());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_FEE_GE", "Y");
            } else {
                parms.put("AND_Psych_supp_FEE_GE", "Y");
            }
            parms.put("psychSuppFee", example.getPsychSuppFee());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_FEE_LT", "Y");
            } else {
                parms.put("AND_Psych_supp_FEE_LT", "Y");
            }
            parms.put("psychSuppFee", example.getPsychSuppFee());
            break;
        case PccPaTreatSuppFeeExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Psych_supp_FEE_LE", "Y");
            } else {
                parms.put("AND_Psych_supp_FEE_LE", "Y");
            }
            parms.put("psychSuppFee", example.getPsychSuppFee());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getExampleParms(PccPaTreatSuppFeeExample example) {
        Map parms = new HashMap();
        parms.putAll(getIDExampleParms(example));
        parms.putAll(getFISCAL_YEARExampleParms(example));
        parms.putAll(getFROM_AREAExampleParms(example));
        parms.putAll(getSORT_IDExampleParms(example));
        parms.putAll(getPATIENTS_TYPEExampleParms(example));
        parms.putAll(getTREAT_FEEExampleParms(example));
        parms.putAll(getNutrit_supp_scaleExampleParms(example));
        parms.putAll(getNutrit_supp_PRICEExampleParms(example));
        parms.putAll(getNutrit_supp_FEEExampleParms(example));
        parms.putAll(getPsych_supp_scaleExampleParms(example));
        parms.putAll(getPsych_supp_PRICEExampleParms(example));
        parms.putAll(getPsych_supp_FEEExampleParms(example));
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public int selectCountByExample(PccPaTreatSuppFeeExample example) {
        Map parms = getExampleParms(example);
        int count = ((Integer)getSqlMapClientTemplate().queryForObject("pcc_pa_treat_supp_fee.abatorgenerated_selectCountByExample", parms)).intValue();
        return count;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public PageBox selectByExampleWithPaging(PccPaTreatSuppFeeExample example, int pageSize, int pageNum, String orderByClause) {
        Map parms = getExampleParms(example);
        if (orderByClause != null) {
            parms.put("ABATOR_ORDER_BY_CLAUSE", orderByClause);
        }
        PageBox pageBox = new PageBox();
        PageObject pageObject = new PageObject();
        pageObject.setPageSize(pageSize);
        pageObject.setPageIndex(pageNum);
        int itemAmount = selectCountByExample(example);
        pageObject.setItemAmount(itemAmount);
        List pageList = null;
        if (pageObject.getBeginIndex() <= pageObject.getItemAmount()) {
            pageList = (getSqlMapClientTemplate().queryForList("pcc_pa_treat_supp_fee.abatorgenerated_selectByExample", parms, pageObject.getBeginIndex() - 1, pageSize));
        }
        pageBox.setPageObject(pageObject);
        pageBox.setPageList(pageList);
        return pageBox;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public PageBox selectByExampleWithPaging(PccPaTreatSuppFeeExample example, int pageSize, int pageNum) {
        return selectByExampleWithPaging(example, pageSize, pageNum, null);
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_pa_treat_supp_fee
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public int updateByPrimaryKeyForCgs(PccPaTreatSuppFee record) {
        int rows = getSqlMapClientTemplate().update("pcc_pa_treat_supp_fee.abatorgenerated_updateByPrimaryKeyForCgs", record);
        return rows;
    }
}